#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int  M = 0, N = 0, c = 0;
	scanf("%d %d", &M, &N);
	int arr[21][21];
	int i = 0, j = 0;
	
	for (i = 0; i < M; i++)
	{
		for (j = 0; j < N; j++)
		{
			scanf("%d ", &arr[i][j]);
		}
	}
	for (i = 1; i < M - 1; i++)
	{
		for (j = 1; j < N - 1; j++)
		{
			if (arr[i][j] > arr[i][j + 1] && arr[i][j] > arr[i][j - 1] && arr[i][j] > arr[i + 1][j] && arr[i][j] > arr[i - 1][j])
			{
				printf("%d %d %d\n", arr[i][j], i + 1, j + 1);
				c++;
			}
		}
	}
	if (c == 0)
		printf("None %d %d", M, N);
	
	return 0;
}			